<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_35) on Mon Feb 18 13:12:23 EET 2013 -->
<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
<TITLE>
DirectUtilsProvider (LWUIT for Series 40)
</TITLE>

<META NAME="date" CONTENT="2013-02-18">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="DirectUtilsProvider (LWUIT for Series 40)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DirectUtilsProvider.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/nokia/lwuit/Dbug.html" title="class in com.nokia.lwuit"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/nokia/lwuit/GestureHandler.html" title="class in com.nokia.lwuit"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?com/nokia/lwuit/DirectUtilsProvider.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="DirectUtilsProvider.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.nokia.lwuit</FONT>
<BR>
Class DirectUtilsProvider</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.nokia.lwuit.DirectUtilsProvider</B>
</PRE>
<HR>
<DL>
<DT><PRE>public abstract class <B>DirectUtilsProvider</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
Wrapper class for Nokia DirectUtils class. Here's a copy and paste of the javadoc:
 This class is a placeholder of utility methods. 
 It contains methods for converting standard lcdui classes to Nokia UI classes and vice versa, 
 and method for creating Image out of ARGB pixel array, 
 creating empty transparent or specific background colored images, 
 creating mutable image from encoded image byte array.
<P>

<P>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/nokia/lwuit/DirectUtilsProvider.html#DirectUtilsProvider()">DirectUtilsProvider</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;javax.microedition.lcdui.Image</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/nokia/lwuit/DirectUtilsProvider.html#createImage(byte[], int, int)">createImage</A></B>(byte[]&nbsp;imageData,
            int&nbsp;imageOffset,
            int&nbsp;imageLength)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a mutable image which is decoded from the data stored in the specified byte array at the specified offset and length.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;javax.microedition.lcdui.Image</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/nokia/lwuit/DirectUtilsProvider.html#createImage(int, int, int)">createImage</A></B>(int&nbsp;width,
            int&nbsp;height,
            int&nbsp;color)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method will return a newly created mutable Image with specified dimension 
 with all pixels of an image of defined ARGB color.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../com/nokia/lwuit/DirectUtilsProvider.html" title="class in com.nokia.lwuit">DirectUtilsProvider</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/nokia/lwuit/DirectUtilsProvider.html#getDirectUtils()">getDirectUtils</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an instance of the DirectUtilsProvider</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;javax.microedition.lcdui.Font</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/nokia/lwuit/DirectUtilsProvider.html#getFont(int)">getFont</A></B>(int&nbsp;identifier)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method returns new instance of javax.microedition.lcdui.Font.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;javax.microedition.lcdui.Font</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/nokia/lwuit/DirectUtilsProvider.html#getFont(int, int, int)">getFont</A></B>(int&nbsp;face,
        int&nbsp;style,
        int&nbsp;height)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The method returns new instance of javax.microedition.lcdui.Font with custom font height.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="DirectUtilsProvider()"><!-- --></A><H3>
DirectUtilsProvider</H3>
<PRE>
public <B>DirectUtilsProvider</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="createImage(byte[], int, int)"><!-- --></A><H3>
createImage</H3>
<PRE>
public abstract javax.microedition.lcdui.Image <B>createImage</B>(byte[]&nbsp;imageData,
                                                           int&nbsp;imageOffset,
                                                           int&nbsp;imageLength)</PRE>
<DL>
<DD>Creates a mutable image which is decoded from the data stored in the specified byte array at the specified offset and length. The data must be in a self-identifying image file format supported by the implementation, such as PNG.
 Note that the semantics of this method are exactly the same as Image.createImage(byte[],int,int) except that the returned image is mutable.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>imageData</CODE> - the array of image data in a supported image format<DD><CODE>imageOffset</CODE> - the offset of the start of the data in the array<DD><CODE>imageLength</CODE> - the length of the data in the array
<DT><B>Returns:</B><DD>the created mutable image</DL>
</DD>
</DL>
<HR>

<A NAME="createImage(int, int, int)"><!-- --></A><H3>
createImage</H3>
<PRE>
public abstract javax.microedition.lcdui.Image <B>createImage</B>(int&nbsp;width,
                                                           int&nbsp;height,
                                                           int&nbsp;color)</PRE>
<DL>
<DD>The method will return a newly created mutable Image with specified dimension 
 with all pixels of an image of defined ARGB color. The color can contain alpha '
 channel transparency information.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of the new image, in pixels<DD><CODE>height</CODE> - the height of the new image, in pixels<DD><CODE>color</CODE> - the color of the image.
<DT><B>Returns:</B><DD>the created image
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - - if either width or height is zero or less</DL>
</DD>
</DL>
<HR>

<A NAME="getFont(int)"><!-- --></A><H3>
getFont</H3>
<PRE>
public abstract javax.microedition.lcdui.Font <B>getFont</B>(int&nbsp;identifier)</PRE>
<DL>
<DD>The method returns new instance of javax.microedition.lcdui.Font. Legacy function, use of this function is deprecated.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>identifier</CODE> - Legacy identifier, use of this is depracted.
<DT><B>Returns:</B><DD>new instance of javax.microedition.lcdui.Font</DL>
</DD>
</DL>
<HR>

<A NAME="getFont(int, int, int)"><!-- --></A><H3>
getFont</H3>
<PRE>
public abstract javax.microedition.lcdui.Font <B>getFont</B>(int&nbsp;face,
                                                      int&nbsp;style,
                                                      int&nbsp;height)</PRE>
<DL>
<DD>The method returns new instance of javax.microedition.lcdui.Font with custom font height. System provides a font that matches the requested attributes as closely as possible.
 Font created in this way can be used only for Graphics instance (Canvas, CustomItem, Image). This font is not supported for high-level UI components (ChoiceGroup, StringItem and List). If font with custom height is set to some high-level component, it's replaced by default font.
 Actual font height could be affected by system limitations, there may be a maximum height defined by the system.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>face</CODE> - one of Font.FACE_SYSTEM, Font.FACE_MONOSPACE, or Font.FACE_PROPORTIONAL<DD><CODE>style</CODE> - Font.STYLE_PLAIN, DirectUtils.STYLE_LIGHT, or a combination of Font.STYLE_BOLD, Font.STYLE_ITALIC, and Font.STYLE_UNDERLINED<DD><CODE>height</CODE> - font height in pixels
<DT><B>Returns:</B><DD>new instance of javax.microedition.lcdui.Font</DL>
</DD>
</DL>
<HR>

<A NAME="getDirectUtils()"><!-- --></A><H3>
getDirectUtils</H3>
<PRE>
public static <A HREF="../../../com/nokia/lwuit/DirectUtilsProvider.html" title="class in com.nokia.lwuit">DirectUtilsProvider</A> <B>getDirectUtils</B>()</PRE>
<DL>
<DD>Get an instance of the DirectUtilsProvider
<P>
<DD><DL>

<DT><B>Returns:</B><DD>new instance of the provider or null, if API not supported by the device.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DirectUtilsProvider.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/nokia/lwuit/Dbug.html" title="class in com.nokia.lwuit"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/nokia/lwuit/GestureHandler.html" title="class in com.nokia.lwuit"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?com/nokia/lwuit/DirectUtilsProvider.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="DirectUtilsProvider.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>
